<template>
  <view class="container">
    <view>22222</view>
  </view>
</template>

<script setup>
import { useDidShow } from '@tarojs/taro'
import { ref } from 'vue'

const login = () => {
  wx.login({
    success: res => {
      if (res.code) {
        console.log(res.code)
      } else {
        console.log('登录失败！' + res.errMsg)
      }
    }
  })
}

useDidShow(() => {
  login()
})
</script>

<style lang="scss" scope></style>
